<?
	require_once('Authentication.php');
	if (isset($_REQUEST['refer']))
	{
		$refer = $_REQUEST['refer'];
	}
	else if(isset($_SERVER['HTTP_REFERER']))
	{
		$refer = ($_SERVER['HTTP_REFERER']);
	}
	else
	{
		$refer = '../EcommSite/Home.php';
	}
	if(isset($_REQUEST['Email']))
	{
		if(DoLogin($_REQUEST['Email'], $_REQUEST['Password']))
		{
			header("location: $refer");
		}
		
	}
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../ECommSite/ECommCss.css" />
<!-- Tab Icon -->
<link rel="shortcut icon" href="http://mobilitysite.com/wp-content/uploads/2007/08/mlb.jpg"> 
<title>BP Sports Login Page</title>
</head>
<body>
<img src="http://www.bpsportscards.com/images/store_version1/storelogo/BP%20Cards.jpg"
	alt="BP Sports Cards" width="640" height="170"/>
	

<form method="post">
	Username: <input type="text" name="Email"/>
	<br/>
	Password: <input type="password" name="Password" />
	<br/>
	<input type="hidden" name="refer" value="<?=$refer?>"/>
	<input type="submit" value="Login" />
	
	
</form>
</body>
</html>